# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: tardo <tardo@nagi-fanboi.net>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=mod_dnssd
pkgver=0.6
pkgrel=8
pkgdesc="Zeroconf module for Apache2"
arch=('x86_64')
url="http://0pointer.de/lennart/projects/mod_dnssd"
license=('APACHE')
depends=('avahi' 'apache')
source=(http://0pointer.de/lennart/projects/$pkgname/${pkgname}-${pkgver}.tar.gz
        fix_undefined_reference.patch) # from upstream be2fb9f6158f80068
sha512sums=('c3eacd2065f996ace76496b828a5be4b735225782c88ed0fba00c37ffed91af7c81cef755556968880e11e05fbaf65a4326728cb82abcad03ccaf925be1f29d3'
            '3a7742d7c31b6fd9bbc3a67b72408b1149b86774cd5204effa0bd9c8cd15c6e0e7a045c72cd7eb3f9ea0b946282891a8a032b5b1c7713435c4eaccbef7c55535')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 < "${srcdir}/fix_undefined_reference.patch"
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --disable-lynx
  make
}

package() {
  cd ${pkgname}-${pkgver}
  install -D -m755 src/.libs/mod_dnssd.so "${pkgdir}/usr/lib/httpd/modules/mod_dnssd.so"
}
